// 题目选项接口
export interface QuestionOption {
  id: string
  content?: string
  name?: string
}

// 答案接口 - 对象格式
export interface Answer {
  id: string
  name?: string
}

// 答案类型联合 - 支持对象数组、字符串数组和普通字符串
export type AnswerType = Answer | Answer[] | string | string[] | null

// 题目接口
export interface Question {
  id: string
  stem: string
  stemImg: string
  score: string | number
  options: string // JSON字符串
  answers: string // JSON字符串
  userAnswer: string // JSON字符串
  analysis: string
  tag: string
  difficulty: string
  type: string
  courseId: string
  paperId: string
  questionSort: number
  typeSort: number
}

// 成绩接口

export interface Score {
  id: string
  score: number
  partScore?: number | null
  actualScore: number | null
  correctConfidenceRate: string
  markMethod: string
  questionSort: number
  result: string
  type: string
  typeSort: number
}


// 题目类型接口
export interface QuestionType {
  name: string
  type: string
  typeSort: number
  questions: Question[]
}

// 题目批改接口
export interface QuestionCorrectType {
  name: string
  type: string
  typeSort: number
  questions: Score[]
}

// 考试数据接口
export interface ExamData {
  questionTitle: string
  qtyList: QuestionType[]
}

// 用户信息接口
export interface ExamUser {
  id: string
  name: string
  [key: string]: any
}

// 考试用户列表接口
export interface ExamUsersListParams {
  examId: string
  orgId: string
}

// 考试用户答案参数接口
export interface ExamUsersAnswerParams {
  examScoreId: string
}

// 考试用户分数参数接口
export interface ExamUsersScoreParams {
  examScoreId: string
}

// 考试设置参数接口
export interface Configuration {
  deviceCheck: boolean
  optionShuffle: boolean
  questionShuffle: boolean
  suppressCopyAndPaste: boolean
  suppressCopyAndPasteCount: number
  suppressSwitchingScreen: boolean
  suppressSwitchingScreenCount: number
}

// 组织参数接口
export interface OrganizationScoreDTO {
  committedCount: number
  correctedCount: number
  id: string
  name: string
  total: number
}

// 考试详情参数接口
export interface ExamDetail {
  beginTime: string
  certificationId: string
  certificationName: string
  configuration: Configuration
  correctMethod: string
  courseId: string
  courseName: string
  description: string
  draft: null
  duration: number
  id: string
  location: string
  mode: string
  name: string
  organizationIdList: string[]
  organizationScoreDTOList: OrganizationScoreDTO[]
  paperIdList: string[]
  status: string
} 
